﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TweetSharp.Twitter.Fluent;
using TweetSharp.Twitter.Extensions;
using TweetSharp.Twitter.Model;
using Newtonsoft.Json;

namespace EGym.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewData["Message"] = DateTime.Now.ToLongDateString().ToString();

            return View();
        }

        public ActionResult Cadastros()
        {
            return View();
        }

        public ActionResult Twitter()
        {
            return View();
        }

        public ActionResult TweetUpdate()
        {
            var twitter = FluentTwitter.CreateRequest()
                .AuthenticateAs("@jofernando123", "123jofernando")
                .Statuses().Update("testing2, one, two, three!").AsXml();
            
            var response = twitter.Request();
            
            return View();
        }
    }
}
